]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
sessionMode: add a property to disable window manager menus
authorCosimo Cecchi <cosimoc@gnome.org>
Sat, 3 Jun 2017 22:37:36 +0000 (15:37 -0700)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 6 Jun 2019 01:25:04 +0000 (01:25 +0000)
We will use this to disable menus in the initial-setup session.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/569

js/ui/sessionMode.js
js/ui/windowMenu.js

index 25aa75a3df27bab184b11ce77dec877113e2528c..1f3e23b7a5508899602a120a0c788e41e7215e55 100644 (file)
@@ -25,6 +25,7 @@ const _modes = {
         hasWorkspaces: false,
         hasWindows: false,
         hasNotifications: false,
+        hasWmMenus: false,
         isLocked: false,
         isGreeter: false,
         isPrimary: false,
@@ -86,6 +87,7 @@ const _modes = {
         hasRunDialog: true,
         hasWorkspaces: true,
         hasWindows: true,
+        hasWmMenus: true,
         hasNotifications: true,
         isLocked: false,
         isPrimary: true,
index 78b307db8eec7b5d7fadda45d3734b7421cfe1d4..ed161765e9ff3220d1660b1a064544f0459f2e63 100644 (file)
@@ -203,6 +203,9 @@ var WindowMenuManager = class {
     }
 
     showWindowMenuForWindow(window, type, rect) {
+        if (!Main.sessionMode.hasWmMenus)
+            return;
+
         if (type != Meta.WindowMenuType.WM)
             throw new Error('Unsupported window menu type');
         let menu = new WindowMenu(window, this._sourceActor);